/*
对操作数据库不同表的sql语句的封装*/
/**
 * 对操作不同表，sql语句的封装
 */
let cont_user = {
    insert: "INSERT INTO cont_user(name, tell, qq, type, address, remark, create_time) VALUES(?,?,?,?,?,?,?)",
    update: "UPDATE cont_user SET name=?, tell=?, qq=?, type=?, address=?, remark=?, edit_time=? WHERE id=?",
    delete: "DELETE FROM cont_user WHERE id=?",
    queryById: "SELECT * FROM cont_user WHERE id=?",
    queryAll: "SELECT * FROM cont_user"
};
let file_num = {
    insert: "INSERT INTO file_num(name, file_number, create_time) VALUES(?,?,?)",
    update: "UPDATE file_num SET name=?, file_number=?, remark=?, edit_time=? WHERE bid=?",
    delete: "DELETE FROM file_num WHERE bid=?",
    queryById: "SELECT * FROM file_num WHERE bid=?",
    queryAll: "SELECT * FROM file_num",
};
let admin_user = {
    update: "UPDATE admin_user SET edit_time=? WHERE user_id=?",
    queryById: "SELECT * FROM admin_user WHERE user=?"
}

module.exports = {
    cont_user,
    file_num,
    admin_user
};
